home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Acao / pandawars.swf / scripts / frame_136 / PlaceObject2_158_214 / CLIPACTIONRECORD onClipEvent(enterFrame).as next >
Encoding:
Text File  |  2007-03-20  |  1.8 KB  |  73 lines

  1. onClipEvent(enterFrame){
  2.    timer += 1;
  3.    rot = this._rotation + 90;
  4.    this._x += Math.sin(rot * 3.141592653589793 / 180) * speed;
  5.    this._y -= Math.cos(rot * 3.141592653589793 / 180) * speed;
  6.    if(this.hitTest(_root.zako2.hit))
  7.    {
  8.       speed = 0;
  9.       _root.zako2.myColor.setRGB(16777062);
  10.       _root.zako2.hit.gotoAndPlay(2);
  11.       _root.zako2.life -= 10;
  12.       this.removeMovieClip();
  13.    }
  14.    if(this.hitTest(_root.zako3.hit))
  15.    {
  16.       speed = 0;
  17.       _root.zako3.myColor.setRGB(16777062);
  18.       _root.zako3.hit.gotoAndPlay(2);
  19.       _root.zako3.life -= 10;
  20.       this.removeMovieClip();
  21.    }
  22.    if(this.hitTest(_root.zako4.hit))
  23.    {
  24.       speed = 0;
  25.       _root.zako4.myColor.setRGB(16777062);
  26.       _root.zako4.hit.gotoAndPlay(2);
  27.       _root.zako4.life -= 10;
  28.       this.removeMovieClip();
  29.    }
  30.    if(this.hitTest(_root.zako5.hit))
  31.    {
  32.       speed = 0;
  33.       _root.zako5.myColor.setRGB(16777062);
  34.       _root.zako5.hit.gotoAndPlay(2);
  35.       _root.zako5.life -= 10;
  36.       this.removeMovieClip();
  37.    }
  38.    if(this.hitTest(_root.zako6.hit))
  39.    {
  40.       speed = 0;
  41.       _root.zako6.myColor.setRGB(16777062);
  42.       _root.zako6.hit.gotoAndPlay(2);
  43.       _root.zako6.life -= 10;
  44.       this.removeMovieClip();
  45.    }
  46.    if(this.hitTest(_root.zako7.hit))
  47.    {
  48.       speed = 0;
  49.       _root.zako7.myColor.setRGB(16777062);
  50.       _root.zako7.hit.gotoAndPlay(2);
  51.       _root.zako7.life -= 10;
  52.       this.removeMovieClip();
  53.    }
  54.    if(_root.yuka.jimen.hitTest(_X,_Y,true) || timer > 10)
  55.    {
  56.       this.removeMovieClip();
  57.    }
  58.    if(Key.isDown(65))
  59.    {
  60.       if(_root.yuka._x < 230)
  61.       {
  62.          this._x += _root.ido;
  63.       }
  64.    }
  65.    if(Key.isDown(68))
  66.    {
  67.       if(_root.yuka._x > -2830)
  68.       {
  69.          this._x -= _root.ido;
  70.       }
  71.    }
  72. }
  73.